﻿/********************************************************************
	日期:2022/4/28 22:07
	名称:ClientSession
	邮箱:yunnibbd@163.com
	作者:yunni
	描述:客户端网络会话
*********************************************************************/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PENet;
using PEProtocol;

public class ClientSession : PESession<GameMsg>{
    protected override void OnConnected(){
        GameRoot.AddTips("连接服务器成功");
        PECommon.Log("Server Connect");
    }

    protected override void OnDisConnected(){
        GameRoot.AddTips("与服务器断开连接");
        PECommon.Log("Server DisConnect");
    }

    protected override void OnReciveMsg(GameMsg msg){
        PECommon.Log("RecPack CMD:" + ((CMD) msg.cmd).ToString());
        NetSvc.Instance.AddNetPkt(msg);
    }
}